package com.lanswon.qzsmk.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lanswon.qzsmk.model.CardBatch;
public interface CardBatchMapper {
   
	/**
	 * 保存
	 * @param record
	 * @return
	 */
    int insert(CardBatch record);

    /**
     * 查询当天最新一条记录
     * @return 制卡批次
     */
    CardBatch queryFirstCardBatch();
    
    /**
     * 更新制卡批次信息，更新返回接收人，返回日期
     * @param makeCardNo
     * @return
     */
    int updateBatchByReturnInfo(@Param("makeCardNoList")List<String> makeCardNoList,@Param("empNo")String empNo,@Param("myDate")Date myDate);

    /**
     * 更新
     * @param cardBatch
     * @return
     */
    int update(CardBatch cardBatch);
    
    /**
     * 根据制卡批次号查询
     * @param batchMarkerNo
     * @return
     */
    CardBatch queryCardBatchByBatchMarkerNo(String batchMarkerNo);

	/**
     * 更新制卡批号管理表（出入库撤销）
     * @param batchNoList
     */
    void updateByIncomingCancel(@Param("makeCardNoList")List<String> batchNoList);
    
    /**
     * 通过查询入库号，查询出纸卡批次信息
     * @param storageNo
     * @return
     */
	List<CardBatch> queryCardBatchByStorageNo(@Param("storageNo")String storageNo);
	
	/**
	 * 查询批次号是否已经接收入库过
	 * @param makeCardNoList
	 * @return
	 */
	List<String> queryCardBatchByBatchMarkerNoList(@Param("makeCardNoList")List<String> makeCardNoList);
	
	/**
	 * 
	 * @param branchMakeNoList
	 * @return
	 */
	List<CardBatch> queryFileNameListByMakeNoList(@Param("branchMakeNoList")List<String> branchMakeNoList);
	
	/**
	 * 通过制卡批号，查找市民卡号
	 * @param cardBatchNo
	 * @return
	 */
	//List<String> queryCitizenCardNoListByBatchMakeNo(@Param("cardBatchNo")String cardBatchNo);
	
	
	
}